function getvalue(key) {
	var str = window.location.search; //location.search是从当前URL的?号开始的字符串  
	var value = "";
	if(str.indexOf(key) != -1) {
		var pos_start = str.indexOf(key) + key.length + 1;
		var pos_end = str.indexOf("&", pos_start);
		////huiJsonLog("开始位置:" + pos_start);
		////huiJsonLog("结束位置:" + pos_end);
		if(pos_end == -1) {
			value = str.substring(pos_start);
		} else {
			value = str.substring(pos_start, pos_end);
			//			alert("没有此值~~" + key);
			//			value = "";
		}

		////huiJsonLog("value:" + value);
	}
	return value;
}

function initPicker() {
	/* 时间选择器 非关联型绑定 */
	var picker1 = new huiPicker('#btnBirthday', function() {
		var year = picker1.getVal(0);
		var month = picker1.getVal(1);
		var days = picker1.getVal(2);
		hui('#btnBirthday').html(year + '-' + month + '-' + days);
	});
	picker1.level = 3;
	//年份
	var years = new Array();
	for(var i = 2015; i <= 2100; i++) {
		years.push({
			value: i,
			text: i
		});
	}
	picker1.bindData(0, years);
	//月份
	var months = new Array();
	for(var i = 1; i <= 12; i++) {
		if(i < 10) {
			i = '0' + i;
		}
		months.push({
			value: i,
			text: i
		});
	}
	picker1.bindData(1, months);
	//天
	var days = new Array();
	for(var i = 1; i <= 31; i++) {
		if(i < 10) {
			i = '0' + i;
		}
		days.push({
			value: i,
			text: i
		});
	}
	picker1.bindData(2, days);
}
var data = [];
var html = "";

function plusReady() {
	// 确保DOM解析完成
	if(!window.plus) {
		return
	};
	var url = getPosrsonList();
	var homeId = getSavedSelectedFamilyId();
	var pram = {
		"homeId": homeId + ""
	}
	//获取家庭成员信息
	hui.postByJSON(url, pram, function(msg) {
			DebugPrint(msg.personList)
			var presonData;
			var m = msg.personList;
			for(var i = 0; i < m.length; i++) {

				html += "<option value='" + m[i].personName + "'>" + m[i].personName + "</option>";

			}
			hui('#reflexPersonName').html(html);
			DebugPrint(html);
		},
		function(e) {
			hui.iconToast('读取消息失败', 'warn');

		}
	)

}

function initPicker() {
	/* 时间选择器 非关联型绑定 */
	var picker1 = new huiPicker('#btnBirthday', function() {
		var year = picker1.getVal(0);
		var month = picker1.getVal(1);
		var days = picker1.getVal(2);
		hui('#btnBirthday').html(year + '-' + month + '-' + days);
	});
	picker1.level = 3;
	//年份
	var years = new Array();
	for(var i = 2015; i <= 2100; i++) {
		years.push({
			value: i,
			text: i
		});
	}
	picker1.bindData(0, years);
	//月份
	var months = new Array();
	for(var i = 1; i <= 12; i++) {
		if(i < 10) {
			i = '0' + i;
		}
		months.push({
			value: i,
			text: i
		});
	}
	picker1.bindData(1, months);
	//天
	var days = new Array();
	for(var i = 1; i <= 31; i++) {
		if(i < 10) {
			i = '0' + i;
		}
		days.push({
			value: i,
			text: i
		});
	}
	picker1.bindData(2, days);
}